<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="../css/admin.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.longtxt{width:300px;}
</style>
<script>
	function VerifyPage()
	{
		return true;
		//retrun true;
	}

	function MyGoBack()
	{ 
		window.location = "columns.php?sid=<?php echo $sid; ?>&pid=<?php echo $pid; ?>";
		
	}
	
</script>
</head>
<body>
<form name="form1" action="add_col.php" method="post" onSubmit="return VerifyPage();">
<input type="hidden" name="cid" value="<?php echo $cid; ?>" />
<input type="hidden" name="sid" value="<?php echo $sid; ?>" />
<input type="hidden" name="pid" value="<?php echo $pid; ?>" />
<input type="hidden" name="dopost" value="save" />
<div class="listTitle">编辑栏目</div>
<div>
<?php

$cname='';
$display=0;
$tid = '';
$ctype='';

if(!empty($cid))
{	
	$row = $dsql->GetOne("Select * From qf_column where cid='$cid'");

    if(is_array($row))
    {
        $cname = $row['cname'];
		$pid = $row['parentid'];
		$tid = $row['templateid'];
		$display = $row['display'];
		$ctype = $row['ctype'];
		$sid= $row['sid'];
    }
}
?>
<table cellpadding="5">
<tr><td>栏目名称</td><td><input type="text" class="longtxt" id="cname" name="cname" value="<?=$cname?>" /></td></tr>
<tr><td>类型</td><td><input type="text" class="longtxt" id="ctype" name="ctype" value="<?=$ctype?>" /></td></tr>
<tr><td>模板</td><td><input type="text" class="longtxt" id="tid" name="tid" value="<?=$tid?>" /></td></tr>
<tr><td>状态</td><td><input type="radio" id="display0" name="display" value="0" <?php if($display==0)echo('checked');?>  />显示&nbsp;&nbsp;<input type="radio" id="display1" name="display" value="1" <?php if($display==1)echo('checked');?> />隐藏</td></tr>
<tr><td></td><td><input type="submit" value=" 保存 " />&nbsp;&nbsp;<input type="button" value="返回" onclick="MyGoBack();" /></td></tr>
</table>
</div>
</form>
</body>
</html>